package com.sunkyc.module.book.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.sunkyc.commons.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 权限图书测试数据
 * </p>
 *
 * @author sunkyc
 * @since 2022-06-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sunkyc_book")
@ApiModel(value="SunkycBook对象", description="权限图书测试数据")
public class SunkycBook extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "book_id", type = IdType.ASSIGN_ID)
    private Long bookId;

    @ApiModelProperty(value = "图书名称")
    @NotBlank(message = "图书名称不能为空")
    private String bookName;

    @ApiModelProperty(value = "作者")
    @NotBlank(message = "作者不能为空")
    private String bookAuthro;

    @ApiModelProperty(value = "ISBN")
    @NotBlank(message = "ISBN不能为空")
    private String bookIsbn;

    @ApiModelProperty(value = "出版社")
    @NotBlank(message = "出版社不能为空")
    private String bookCbs;

    @ApiModelProperty(value = "出版时间")
    @NotBlank(message = "出版时间不能为空")
    private String bookCbTime;

    @ApiModelProperty(value = "图书封面")
    private String bookPic;

    @ApiModelProperty(value = "页数")
    @NotBlank(message = "页数不能为空")
    private String bookPages;

    /**
     * 填充字段，主要为了权限测试前端视图区分
     */
    @ApiModelProperty("上传者昵称")
    @TableField(exist = false)
    private String createByStr;


}
